package ru.tulupov.scheduledrunner;

 
public class Runner implements Runnable {
	private String command;

	public Runner(String command) {
		if (command == null) {
			throw new IllegalArgumentException();
		}
		this.command = command;
	}

	@Override
	public void run() {
		try {
			Runtime runtime = Runtime.getRuntime();
			runtime.exec(command);
		} catch (Exception e) {
			throw new ExecutionFailedException();
		}
	}
}
